﻿<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="clr-namespace:DeepZoom.Controls">
    <Style TargetType="{x:Type local:MultiScaleImage}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type local:MultiScaleImage}">
                    <ItemsControl x:Name="PART_ItemsControl" Background="Transparent" ClipToBounds="True">
                        <ItemsControl.ItemContainerStyle>
                            <Style TargetType="ContentPresenter">
                                <Setter Property="Canvas.Top" Value="{Binding Top}"/>
                                <Setter Property="Canvas.Left" Value="{Binding Left}"/>
                                <Setter Property="Panel.ZIndex" Value="{Binding ZIndex}"/>
                            </Style>
                        </ItemsControl.ItemContainerStyle>
                        <ItemsControl.ItemTemplate>
                            <DataTemplate>
                                <local:TileHost Source="{Binding Source}" Scale="{Binding Scale}" />
                               <!--  Modified="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:MultiScaleImage}},Path=Modified}" 
                                Brightness="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:MultiScaleImage}},Path=Brightness}" -->
                            </DataTemplate>
                        </ItemsControl.ItemTemplate>
                    </ItemsControl>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>
